#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
    int arr[7] = { 0 };
    while (scanf("%d %d %d %d %d %d %d", &arr[0], &arr[1], &arr[2], &arr[3], &arr[4], &arr[5], &arr[6]) != EOF)
    {
        int max = 0;
        int min = 0;
        int i = 0;
        double ret = 0;
        for (i = 1; i < 7; i++)
        {
            max = arr[max] > arr[i] ? max : i;
            min = arr[min] < arr[i] ? min : i;
        }
        for (i = 0; i < 7; i++)
        {
            if (i != max && i != min)
                ret += arr[i];
        }
        ret = ret / 5;
        printf("%.2lf\n", ret);

    }

    return 0;
}